FROM centos
MAINTAINER Joliu<ljo0412@live.com>

RUN yum install -y http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm &&\
        yum install -y iperf iptables tc
RUN yum install -y net-tools.x86_64
RUN echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf

RUN mkdir -p /tmp/static

COPY jdk1.8.0_111 jdk1.8.0_111
ENV JAVA_HOME=/jdk1.8.0_111
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

ADD space-iot-raft-1.0-SNAPSHOT.jar sate_raft.jar
ADD getIpTest.jar selfIp.jar

ENTRYPOINT ["java","-jar","sate_raft.jar"]
